import http from '@/libs/http'
import Qs from 'qs'

/**
 * 用户登录
 * @param data {"account": "", "password": ""}
 */
export function login(data) {
    return http({
        url: '/sso/login',
        method: 'post',
        data
    })
}

/**
 * 验证Token有效性
 */
export function validToken() {
    return http({
        url: '/sso/validToken',
        method: 'get'
    })
}

/**
 * 用户退出登录
 */
export function logout() {
    return http({
        url: '/sso/logout',
        method: 'get'
    })
}